import request from '@/util/request'

export function list(data) {
  return request({
    url: '/api/article/list',
    method: 'post',
    data
  })
}

export function view(data) {
  return request({
    url: '/api/article/view',
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: '/api/article/add',
    method: 'post',
    data
  })
}

export function checkFavorite(data) {
  return request({
    url: '/api/article/check',
    method: 'post',
    data
  })
}
export function createFav(data) {
  return request({
    url: '/api/article/create',
    method: 'post',
    data
  })
}
export function removeFav(data) {
  return request({
    url: '/api/article/delete',
    method: 'post',
    data
  })
}

export function favList(data) {
  return request({
    url: '/api/article/fav-list',
    method: 'post',
    data
  })
}

export function category(data) {
  return request({
    url: '/api/article/category',
    method: 'post',
    data
  })
}
